package com.yonyou.isv.demo.openapi.base.module.isv.event.pojo;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 本类主要用于
 *
 * @author liuhaoi
 * @since Created At 2020/5/25 11:16 上午
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ISVTenantOrderEvent extends ISVEvent {

    /**
     * 授权租户的 tenantId
     */
    private String authTenantId;

    @Data
    public static class Order {

        /**
         * 购买用户的 email
         */
        private String email;

        /**
         * 产品开通有效期截止时间 unix 时间戳
         */
        private Long expiredOn;

        /**
         * 产品开通的租期，单位为月
         */
        private Integer lease;

        private String mobile;

        /**
         * 是否新购，即是首次购买该产品还是续期
         */
        private Boolean newBuy;
        private String orderId;
        private String orderSkuId;
        private String productName;

        /**
         * 订单来源，diwork购买的此处为"diwork", 测试企业授权事件此处为"open-test"
         */
        private String resCode;
        private String skuName;
        private Long ts;

        /**
         * 购买用户的友户通 id
         */
        private String userId;

        private String appCode;
        private String appName;
    }

}
